package com.example;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

/**
 * Created with IntelliJ IDEA.
 * User: Jasic
 * Date: 12-11-8
 */
public class MyService extends Service {

    public MyService(){

        System.out.println("MyService constructure");
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        System.out.println("onStartCommand...");
        System.out.println("flags is [" + flags +"]");
        System.out.println("startId is [" + startId +"]");
        System.out.println("Name is [ " + intent.getExtras().get("name") +"]");

        return START_STICKY;
    }

    @Override
    public void onDestroy() {
        System.out.println("onDestroy ...");
    }

    @Override
    public void onCreate() {
        super.onCreate();
        System.out.println("oneCreate ...");
    }
}
